home *** CD-ROM | disk | FTP | other *** search
/ Stone Design / Stone Design.iso / Stone_Friends / Wave / WavesWorld / Source / Libraries / tcl7.4b3 / doc / man.macros < prev    next >
Encoding:
Text File  |  1995-01-30  |  4.0 KB  |  186 lines

  1. '\" The definitions below are for supplemental macros used in Tcl/Tk
  2. '\" manual entries.
  3. '\"
  4. '\" .HS name section [date [version]]
  5. '\"    Replacement for .TH in other man pages.  See below for valid
  6. '\"    section names.
  7. '\"
  8. '\" .AP type name in/out [indent]
  9. '\"    Start paragraph describing an argument to a library procedure.
  10. '\"    type is type of argument (int, etc.), in/out is either "in", "out",
  11. '\"    or "in/out" to describe whether procedure reads or modifies arg,
  12. '\"    and indent is equivalent to second arg of .IP (shouldn't ever be
  13. '\"    needed;  use .AS below instead)
  14. '\"
  15. '\" .AS [type [name]]
  16. '\"    Give maximum sizes of arguments for setting tab stops.  Type and
  17. '\"    name are examples of largest possible arguments that will be passed
  18. '\"    to .AP later.  If args are omitted, default tab stops are used.
  19. '\"
  20. '\" .BS
  21. '\"    Start box enclosure.  From here until next .BE, everything will be
  22. '\"    enclosed in one large box.
  23. '\"
  24. '\" .BE
  25. '\"    End of box enclosure.
  26. '\"
  27. '\" .VS
  28. '\"    Begin vertical sidebar, for use in marking newly-changed parts
  29. '\"    of man pages.
  30. '\"
  31. '\" .VE
  32. '\"    End of vertical sidebar.
  33. '\"
  34. '\" .DS
  35. '\"    Begin an indented unfilled display.
  36. '\"
  37. '\" .DE
  38. '\"    End of indented unfilled display.
  39. '\"
  40. '\" @(#) man.macros 1.2 95/01/30 10:39:08
  41. .\"
  42. '\"    # Heading for Tcl/Tk man pages
  43. .de HS
  44. .ds ^3 \\0
  45. .if !"\\$3"" .ds ^3 \\$3
  46. .if '\\$2'cmds'      .TH "\\$1" 1 "\\*(^3" "\\$4" "\\$5"
  47. .if '\\$2'lib'       .TH "\\$1" 3 "\\*(^3" "\\$4" "\\$5"
  48. .if '\\$2'ncmds'     .TH "\\$1" n "\\*(^3" "\\$4" "\\$5"
  49. .if '\\$2'tcl'       .TH "\\$1" n "\\*(^3"  Tcl   "Tcl Built-In Commands"
  50. .if '\\$2'tk'        .TH "\\$1" n "\\*(^3"  Tk    "Tk Commands"
  51. .if '\\$2'tclc'      .TH "\\$1" 3 "\\*(^3"  Tcl   "Tcl Library Procedures"
  52. .if '\\$2'tkc'       .TH "\\$1" 3 "\\*(^3"  Tk    "Tk Library Procedures"
  53. .if '\\$2'tclcmds'   .TH "\\$1" 1 "\\*(^3"  Tcl    "Tcl Applications"
  54. .if '\\$2'tkcmds'    .TH "\\$1" 1 "\\*(^3"  Tk    "Tk Applications"
  55. .if t .wh -1.3i ^B
  56. .nr ^l \\n(.l
  57. .ad b
  58. ..
  59. '\"    # Start an argument description
  60. .de AP
  61. .ie !"\\$4"" .TP \\$4
  62. .el \{\
  63. .   ie !"\\$2"" .TP \\n()Cu
  64. .   el          .TP 15
  65. .\}
  66. .ie !"\\$3"" \{\
  67. .ta \\n()Au \\n()Bu
  68. \&\\$1    \\fI\\$2\\fP    (\\$3)
  69. .\".b
  70. .\}
  71. .el \{\
  72. .br
  73. .ie !"\\$2"" \{\
  74. \&\\$1    \\fI\\$2\\fP
  75. .\}
  76. .el \{\
  77. \&\\fI\\$1\\fP
  78. .\}
  79. .\}
  80. ..
  81. '\"    # define tabbing values for .AP
  82. .de AS
  83. .nr )A 10n
  84. .if !"\\$1"" .nr )A \\w'\\$1'u+3n
  85. .nr )B \\n()Au+15n
  86. .\"
  87. .if !"\\$2"" .nr )B \\w'\\$2'u+\\n()Au+3n
  88. .nr )C \\n()Bu+\\w'(in/out)'u+2n
  89. ..
  90. '\"    # BS - start boxed text
  91. '\"    # ^y = starting y location
  92. '\"    # ^b = 1
  93. .de BS
  94. .br
  95. .mk ^y
  96. .nr ^b 1u
  97. .if n .nf
  98. .if n .ti 0
  99. .if n \l'\\n(.lu\(ul'
  100. .if n .fi
  101. ..
  102. '\"    # BE - end boxed text (draw box now)
  103. .de BE
  104. .nf
  105. .ti 0
  106. .mk ^t
  107. .ie n \l'\\n(^lu\(ul'
  108. .el \{\
  109. .\"    Draw four-sided box normally, but don't draw top of
  110. .\"    box if the box started on an earlier page.
  111. .ie !\\n(^b-1 \{\
  112. \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul'
  113. .\}
  114. .el \}\
  115. \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul'
  116. .\}
  117. .\}
  118. .fi
  119. .br
  120. .nr ^b 0
  121. ..
  122. '\"    # VS - start vertical sidebar
  123. '\"    # ^Y = starting y location
  124. '\"    # ^v = 1 (for troff;  for nroff this doesn't matter)
  125. .de VS
  126. .mk ^Y
  127. .ie n 'mc \s12\(br\s0
  128. .el .nr ^v 1u
  129. ..
  130. '\"    # VE - end of vertical sidebar
  131. .de VE
  132. .ie n 'mc
  133. .el \{\
  134. .ev 2
  135. .nf
  136. .ti 0
  137. .mk ^t
  138. \h'|\\n(^lu+3n'\L'|\\n(^Yu-1v\(bv'\v'\\n(^tu+1v-\\n(^Yu'\h'-|\\n(^lu+3n'
  139. .sp -1
  140. .fi
  141. .ev
  142. .\}
  143. .nr ^v 0
  144. ..
  145. '\"    # Special macro to handle page bottom:  finish off current
  146. '\"    # box/sidebar if in box/sidebar mode, then invoked standard
  147. '\"    # page bottom macro.
  148. .de ^B
  149. .ev 2
  150. 'ti 0
  151. 'nf
  152. .mk ^t
  153. .if \\n(^b \{\
  154. .\"    Draw three-sided box if this is the box's first page,
  155. .\"    draw two sides but no top otherwise.
  156. .ie !\\n(^b-1 \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c
  157. .el \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c
  158. .\}
  159. .if \\n(^v \{\
  160. .nr ^x \\n(^tu+1v-\\n(^Yu
  161. \kx\h'-\\nxu'\h'|\\n(^lu+3n'\ky\L'-\\n(^xu'\v'\\n(^xu'\h'|0u'\c
  162. .\}
  163. .bp
  164. 'fi
  165. .ev
  166. .if \\n(^b \{\
  167. .mk ^y
  168. .nr ^b 2
  169. .\}
  170. .if \\n(^v \{\
  171. .mk ^Y
  172. .\}
  173. ..
  174. '\"    # DS - begin display
  175. .de DS
  176. .RS
  177. .nf
  178. .sp
  179. ..
  180. '\"    # DE - end display
  181. .de DE
  182. .fi
  183. .RE
  184. .sp
  185. ..
  186.